# -*- coding: utf-8 -*-
import top.api
 
appkey = '23656735'
secret = '91400648c84ddd33f32dd9181d5f14c8'
sessionkey = '620281281f27bfa430e3ZZcc4f438a274819675e989696e552522139'

req=top.api.PictureUploadRequest()
req.set_app_info(top.appinfo(appkey,secret))

req.picture_category_id=0
req.img=top.api.FileItem('1.jpg',open('1.jpg'))
req.image_input_title="Bule.jpg"
#req.title="图片名称"
#req.picture_id=10000
req.client_type="client:computer"
#req.is_https=true
try:
    resp= req.getResponse(sessionkey)
    print(resp)
except Exception,e:
    print(e)
